import {ObjectDto, ObjectDtoInterface} from "../../../services/sqliteDB/object.dto";
import { TableColumnType } from "../../../services/sqliteDB/object.dto";
import {SyncStatus} from "../../sync-status";

export class InspectionOperationsDto extends ObjectDto implements ObjectDtoInterface {

    public id: string = null;         // 操作步骤的Id,  索引列
    public name: string = null;       // 操作步骤名
    public taskId: string = null;     // 检修任务的id
    public isChecked: number = null;  // 是否做过， 1： 做过， 0： 未做
    public syncStatus: SyncStatus = SyncStatus.None; // 同步状态：   （0: 从来没上传, 1: 上传成功, 2: 正在上传, 3: 上传失败)


    constructor() {
        super();
    }

    table() {
        return {
            tableName: "InspectionOperations",
            tableConstructor: {
                id: `${TableColumnType.text} ${TableColumnType.unique}`,
                name: TableColumnType.text,
                taskId: TableColumnType.text,
                isChecked: TableColumnType.int,
                syncStatus: TableColumnType.int,
            }
        };
    }

}
